from abc import ABC, abstractmethod
from decimal import Decimal
from src.core.backtest.context import Context
from src.core.domain.balance import Balance
from src.core.domain.currency import Currency
from src.core.indicators.indicator import RequiresIndicators
from src.enums.timeframe import RequiresTimeframes


class Sizer(ABC, RequiresTimeframes, RequiresIndicators):
    def __init__(self):
        pass

    @abstractmethod
    def calculate_size(self, balance: Balance, context: Context, entry_price: Decimal, currency: Currency) -> Decimal:
        raise NotImplementedError
